Skip to content

Comments

feat: add rest of fork choice metrics#52

Merged
MegaRedHand merged 2 commits intomainfrom
add-forkchoice-metrics
Jan 26, 2026
Merged

feat: add rest of fork choice metrics#52
MegaRedHand merged 2 commits intomainfrom
add-forkchoice-metrics

Conversation

@MegaRedHand
Copy link
Collaborator

@MegaRedHand MegaRedHand commented Jan 26, 2026

This PR adds some more metrics from leanMetrics:

  • lean_attestations_valid_total
  • lean_attestations_invalid_total
  • lean_fork_choice_reorgs_total

Add Group 3 metrics from the leanMetrics specification:
- lean_attestations_valid_total: Count of valid attestations with source label (block/gossip)
- lean_attestations_invalid_total: Count of invalid attestations with source label (block/gossip)
- lean_fork_choice_reorgs_total: Count of fork choice reorganizations

Attestation counting is added to on_gossip_attestation (gossip source)
and on_block (block source). Reorg detection is added to update_head by
checking if the new head is not a direct child of the previous head.
@MegaRedHand MegaRedHand merged commit 88edf2f into main Jan 26, 2026
2 checks passed
@MegaRedHand MegaRedHand deleted the add-forkchoice-metrics branch January 26, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant